Carbon


NavCustomAskSaveChanges

Header: Navigation.h Carbon status: Supported

Displays a Save Changes alert box with a custom alert message.

OSErr NavCustomAskSaveChanges (
    NavDialogOptions *dialogOptions, 
    NavAskSaveChangesResult *reply, 
    NavEventUPP eventProc, 
    void *callBackUD
);
dialogOptions

A pointer to a structure of type NavDialogOptions. Before calling NavCustomAskSaveChanges, set up this structure to specify dialog box settings. When calling NavCustomAskSaveChanges, the message field is the only field you must supply with a value.

reply

A pointer to a structure of type NavAskSaveChangesResult. On return, the value describes the user’s response to the Save Changes alert box. For a description of the constants used to represent possible responses, see “Save Changes Action Constants”.

eventProc

A Universal Procedure Pointer (UPP) of type NavEventProcPtr that points to your application-defined event-handling function. You obtain this UPP by calling the macro NewNavEventProc. Implementing an event-handling function allows your application to update windows after the user moves or resizes the dialog box. If you pass NULL in this parameter, the Save Changes alert box is not movable. For more information, see “Handling Events”.

callBackUD

A pointer to a value set by your application. When the NavCustomAskSaveChanges function calls your event-handling function, the callBackUD value is passed back to your application.

function result

A result code.

DISCUSSION

This function is similar to the function NavAskSaveChanges, except that you provide a custom alert message. This function is useful when you need to post a Save Changes alert box at times other than quitting or closing a file. Your application can display this alert box if a specified time interval has passed since the user last saved changes, for example.

VERSION NOTES

Available in Navigation Services 1.0 and later.

AVAILABILITY

Supported in Carbon. Available in CarbonLib 1.0 and later when NavigationLib 1.0 or later is installed. Exported by CarbonLib 1.0 and later and by NavigationLib 1.0 and later.


© 2000 Apple Computer, Inc. — (Last Updated 4/17/2000)